<template>
   <div class="payresult">

        <div class="header" @click="router">
            <image slot="left" src="http://zhongcai-test.oss-cn-beijing.aliyuncs.com/back_icon.png"  style="height:28px;width:16px;" class="header-img" ></image>
            <div class="header-con">
                <text class="header-title">投注失败</text>
                <!-- <text class="discover_item_icon">&#xe636;</text> -->
            </div>
        </div>
        <div style="display:flex;justify-content:center;align-items:center;margin-top:175px;margin-bottom:116px;">
            <image style="width:396px;height:286px;" src="http://zhongcai-test.oss-cn-beijing.aliyuncs.com/hch5/payfail.png"></image>
            <text style="font-family: PingFangSC-Medium;font-size: 40px;color: #333333;">不好意思，投注失败！</text>
        </div>
        <div class="gopay">
        <div class="gopay_button" @click="againbat()">
            <text style="font-family: PingFangSC-Medium;font-size: 32px;color: #FFFFFF;">{{ type=='fail' ? '重新支付'  : '重新投注'}}</text>
        </div>
        </div>
    </div>
</template>

<script>
//   import WxcMinibar from "@/components/modules/wxc-minibar/index.js"
  import { serialize, getBaseUrl, jsonAnalysis } from "@/utils/index.js";
  const navigator = weex.requireModule("navigator");
  export default {
    data(){
        return {
           type:'',
           baseURL:''
        }
    },

    mounted() {
        let data = jsonAnalysis(decodeURI(weex.config.bundleUrl).split("?")[1])

        this.type = data.type
  
    },
    // components:{
    //   WxcMinibar
    // },
    methods: {
        router(){
            navigator.pop();
        },

        againbat() {
            if( this.type == 'fail' ) {
                navigator.pop();
            } else {
                this.baseURL = getBaseUrl(weex.config.bundleUrl, true)
                navigator.push({
                    'url': this.baseURL + 'index.js',
                    'animated': 'true'
                })
            }
        }
    }

  };
</script>
<style scoped>
   .header {
        width:750px;
        height: 90px;
        background-color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .header-img {
        position: absolute;
        left:32px;
        top:34px;
        margin-left:0;
    }

    .header-title {
        font-size: 34px;
        color: #fff;
        font-family: PingFangSC-Medium;
    }
   .payresult{
      position: absolute;
      background-color:#ffffff;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
   
    .gopay{
        height: 80px;
        padding-left: 187px;
        padding-right: 187px;
        margin-bottom: 48px;
    }
    .gopay_button{
        background-color: #E70D0D;
        display:flex;
        height: 80px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    .gopay_button1{
        border-width: 2px;
        border-style: solid;
        border-color: #D1D1D1;
        border-radius: 4px;
        display:flex;
        height: 80px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
         background-color: white;

    }

</style>